#ifndef WIDENTIFYMANAGER_H
#define WIDENTIFYMANAGER_H

#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QNetworkAddressEntry>

class WidentifyManager : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QString hostAddr READ hostAddr WRITE setHostAddr NOTIFY hostAddrChanged)

private:
    QNetworkAddressEntry m_netaddr;
    QString m_hostAddr;

    QTcpSocket *m_tcpClient;
    QUdpSocket *m_udpClient;

public:
    explicit WidentifyManager(QObject *parent = 0);

    QString hostAddr();

signals:
    void hostAddrChanged();

public slots:
    void setHostAddr(QString arg);
    void processDatagrams();
};

#endif // WIDENTIFYMANAGER_H
